{
GParamSpec *pspec;
+ /**
+ * GtkAppChooser:content-type:
+ *
+ * The content type of the #GtkAppChooser object.
+ */
pspec = g_param_spec_string ("content-type",
P_("Content type"),
P_("The content type used by the open with object"),
g_object_interface_install_property (iface, pspec);
}
+
+/**
+ * gtk_app_chooser_get_content_type:
+ * @self: a #GtkAppChooser
+ *
+ * Returns the current value of the #GtkAppChooser:content-type property.
+ *
+ * Returns: the content type of @self. Free with g_free()
+ *
+ * Since: 3.0
+ */
gchar *
gtk_app_chooser_get_content_type (GtkAppChooser *self)
{
* Returns the currently selected application.
*
* Returns: (transfer full): a #GAppInfo for the currently selected
- * application, or %NULL if none is selected. Free with g_object_unref().
+ * application, or %NULL if none is selected. Free with g_object_unref()
*
* Since: 3.0
*/
* gtk_app_chooser_refresh:
* @self: a #GtkAppChooser
*
- * Reload the list of applications.
+ * Reloads the list of applications.
*
* Since: 3.0
*/
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (oclass, PROP_SHOW_DIALOG_ITEM, pspec);
+ /**
+ * GtkAppChooserButton::custom-item-activated:
+ * @self: the object which received the signal
+ * @item_name: the name of the activated item
+ *
+ * Emitted when a custom item, previously added with
+ * gtk_app_chooser_button_append_custom_item(), is activated from the
+ * dropdown menu.
+ */
signals[SIGNAL_CUSTOM_ITEM_ACTIVATED] =
g_signal_new ("custom-item-activated",
GTK_TYPE_APP_CHOOSER_BUTTON,
g_object_class_override_property (gobject_class, PROP_CONTENT_TYPE, "content-type");
+ /**
+ * GtkAppChooserDialog:gfile:
+ *
+ * The GFile used by the #GtkAppChooserDialog.
+ * The dialog's #GtkAppChooserWidget content type will be guessed from the
+ * file, if present.
+ */
pspec = g_param_spec_object ("gfile",
P_("GFile"),
- P_("The GFile used by the open with dialog"),
+ P_("The GFile used by the app chooser dialog"),
G_TYPE_FILE,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS);
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (gobject_class, PROP_DEFAULT_TEXT, pspec);
+ /**
+ * GtkAppChooserWidget::application-selected:
+ * @self: the object which received the signal
+ * @application: the selected #GAppInfo
+ *
+ * Emitted when an application item is selected from the widget's list.
+ */
signals[SIGNAL_APPLICATION_SELECTED] =
g_signal_new ("application-selected",
GTK_TYPE_APP_CHOOSER_WIDGET,
G_TYPE_NONE,
1, G_TYPE_APP_INFO);
+ /**
+ * GtkAppChooserWidget::application-activated:
+ * @self: the object which received the signal
+ * @application: the activated #GAppInfo
+ *
+ * Emitted when an application item is activated from the widget's list.
+ * This usually happens when the user double clicks an item, or an item
+ * is selected and the user presses one of the keys Space, Shift+Space,
+ * Return or Enter.
+ */
signals[SIGNAL_APPLICATION_ACTIVATED] =
g_signal_new ("application-activated",
GTK_TYPE_APP_CHOOSER_WIDGET,
G_TYPE_NONE,
1, G_TYPE_APP_INFO);
+ /**
+ * GtkAppChooserWidget::populate-popup:
+ * @self: the object which received the signal
+ * @menu: the #GtkMenu to populate
+ * @application: the current #GAppInfo
+ *
+ * Emitted when a context menu is about to popup over an application item.
+ * Clients can insert menu items into the provided #GtkMenu object in the
+ * callback of this signal; the context menu will be shown over the item if
+ * at least one item has been added to the menu.
+ */
signals[SIGNAL_POPULATE_POPUP] =
g_signal_new ("populate-popup",
GTK_TYPE_APP_CHOOSER_WIDGET,